package cn.lzg.common.module.user.response;

import cn.lzg.common.core.serial.Serializer;

public class UserResponse extends Serializer {
	/*
	 * 用户数据
	 * 
	 */
	private String userId;
	private String username;
	private String password;
	private String sex;
	private String adress;
	private String trades;
	private Image avatar;

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getAdress() {
		return adress;
	}

	public void setAdress(String adress) {
		this.adress = adress;
	}

	public String getTrades() {
		return trades;
	}

	public void setTrades(String trades) {
		this.trades = trades;
	}

	public Image getAvatar() {
		return avatar;
	}

	public void setAvatar(Image avatar) {
		this.avatar = avatar;
	}

	// private String userId;
	// private String username;
	// private String password;
	// private String sex;
	// private String adress;
	// private String trades;
	// private byte[] avatar;
	@Override
	protected void read() {
		this.userId = this.readString();
		this.username = this.readString();
		this.password = this.readString();
		this.sex = this.readString();
		this.adress = this.readString();
		this.trades = this.readString();
		this.avatar = this.readImage();
	}

	@Override
	protected void write() {
		this.writeString(userId);
		this.writeString(username);
		this.writeString(password);
		this.writeString(sex);
		this.writeString(adress);
		this.writeString(trades);
		System.out.println("写图片");
		this.writeImage(avatar);
	}

}
